//
//  Home_CollectionViewCell.m
//  HappyRent
//
//  Created by CoderYee on 2017/3/29.
//  Copyright © 2017年 内圈科技. All rights reserved.
//

#import "Home_CollectionViewCell.h"

@implementation Home_CollectionViewCell

-(void)addOwnView{
    
    _goodsImage=[[UIImageView alloc] init];
    _goodsImage.contentMode=UIViewContentModeScaleAspectFill;
    _goodsImage.clipsToBounds=YES;
    [_goodsImage setImage:[UIImage imageNamed:@"baoming2"]];
    [self.contentView addSubview:_goodsImage];
    [_goodsImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.equalTo(self.contentView);
        make.bottom.equalTo(self.contentView).with.offset(-28);
    }];
    
    //收藏
    _collectImageView=[[UIImageView alloc] init];
    [_collectImageView setImage:[UIImage imageNamed:@"home_collection"]];
    [self.contentView addSubview:_collectImageView];
    [_collectImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self.contentView).with.offset(-15);
        make.top.equalTo(self.contentView).with.offset(10);
        make.height.width.mas_equalTo(25);
    }];
    
    //客户头像
    _merchantImage=[[UIImageView alloc] init];
    _merchantImage.layer.cornerRadius=20.0f;
    _merchantImage.layer.masksToBounds=YES;
    [_merchantImage setImage:[UIImage imageNamed:@"4"]];
    [self.contentView addSubview:_merchantImage];
    [_merchantImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(_goodsImage.mas_bottom);
        make.right.equalTo(self.contentView).with.offset(-30);
        make.height.width.mas_equalTo(40);
    }];
    
    _typeLabel=[[UILabel alloc] init];
    _typeLabel.textColor=kGrayColor;
    _typeLabel.font=systemfont(14);
    _typeLabel.text=@"套系套系套系套系套系套系套系";
    [self.contentView addSubview:_typeLabel];
    [_typeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.equalTo(self.contentView);
        make.height.mas_equalTo(21);
        make.bottom.equalTo(self.contentView).with.offset(-3);
    }];
    
}

@end
